<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.emip.bean.MenuDefBean" %> 
<%@ page import="com.emip.config.SysConfig" %>
<%@ page import="com.emip.service.impl.MenuDefServiceImpl" %>
<%@ page import="com.emip.bean.UserBean"%>
<%@ page import="java.util.*" %>	
<%
	//List<MenuDefBean> menu =  SysConfig.getInstance().getMenu();
	List<MenuDefBean>menu = (List<MenuDefBean>) session.getAttribute("userMenus");
 %>
 <head>
 	<script type="text/javascript"
			src="<%=request.getContextPath()+"/resources/"%>customJS/authorityFunc/userModiInfo.js"></script>		
 </head>

<div id="topbar">
	<div id="topinfo">
		<a href="javascript:void(0)"></a>
		<span>${user.name}<span style="color: #888;"> , 欢迎登陆</span></span>
	</div>
	<div id="topnav">
		<ul>
			<li><a href="javascript:showModiInfo()"><img src="${resourceBase}images/profile.png"/>个人资料</a></li>
			<li><a href="javascript:void(0)"><img src="${resourceBase}images/messages.png"/>消息</a></li>
			<li class="last"><a href="${path}/user/logout.do" onclick="return confirm('您确认注销吗？')"><img src="${resourceBase}images/logout.png"/>注销</a></li>
		</ul>
	</div>
</div>    
<div id="sidebar">
	<div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
						
			<h1 id="sidebar-title"><a href="#">EMIP环境监测信息平台</a></h1>
		  
			<!-- Logo (221px wide) -->
			<a href="#"><img id="logo" src="${resourceBase}images/logo3.gif" alt="Simpla Admin logo" /></a>
		  
			<!-- Sidebar Profile links -->
			
			<div id="profile-links">
				<a href="${path}/user/login.do"><img id="showMapIcon" src="${resourceBase}images/icons/showMap.png" /></a>
				<a href="${path}/user/login.do"> 基站地图</a>
			</div>        
			<!-- banner.jsp end-->
			
			<!-- main-nav.jsp-->
			<ul id="main-nav">  <!-- Accordion Menu -->		
			
				<%
				for(int i=0;i<menu.size();i++)
				{
					MenuDefBean l1_Menu = menu.get(i);  
					String l1_href, l1_id = l1_Menu.getId();
					if(l1_Menu.getShowUrl().equals("1"))
					{
						l1_href =l1_Menu.getUrl();
					}else
					{
						l1_href = "#";
					}
				%>
				<li> 
					<a id="<%=l1_id%>" href="<%=path+l1_href%>" class="nav-top-item"> 
					<%= l1_Menu.getName()%>
					</a>
					
					<%
						if(l1_Menu.getChildren().size()>0)
						{
					
					%>
						<ul>
					<%	
							for(MenuDefBean l2_menu:l1_Menu.getChildren() )
							{
					%>	
							<li><a id="<%=l2_menu.getId()%>" href="<%=path+l2_menu.getUrl()%>"><%= l2_menu.getName()%></a></li>	
					<%		
							}
					%>							
														
						</ul>
					<%	
						}
					 %>	
				</li>	
					
				<%
				}			
				 %>	
			
							
							
				
			</ul> <!-- End #main-nav -->
			<!-- main-nav.jsp end-->
			
			
		</div></div> <!-- End #sidebar -->
		
		<!-- 修改用户个人资料的form -->
			<div id="infoDlg">
						<form id="consoleForm">							 
							<table class="formTable">
								<tr>
									<th>
										<span style="color: red">*</span>用户帐号：
									</th>
									<td>
										<input type="text" class="textField" id="eID" name="eID"
											maxlength="10" />
									</td>
									<th>
										<span style="color: red">*</span>用户姓名:
									</th>
									<td>
										<input type="text" class="textField" id="eName" name="eName"
											maxlength="10" />
									</td>
								</tr>								
								<tr>
									<th>
										手机号码：
									</th>
									<td>
										<input type="text" class="textField" id="eMobilePhone"
											name="eMobilePhone" maxlength="20"
											onkeyup=
	value = value.replace(/[^\d]/g, '');
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
									</td>
									<th>
										邮件地址：
									</th>
									<td>
										<input type="text" class="textField" id="eMailAddress"
											name="eMailAddress" maxlength="50" />
									</td>
								</tr>								
								<tr>
									<th>
										地图中心点经度：
									</th>
									<td>
										<input type="text" class="textField" id="longitude"
											name="longitude" maxlength="10" />
									</td>

									<th>
										地图中心点维度：
									</th>
									<td>
										<input type="text" class="textField" id="latitude"
											name="latitude" maxlength="10" />
									</td>

								</tr>
								<tr>
									<th>
										地图缩放级别：
									</th>
									<td>
										<input type="text" class="textField" id="mapZoom"
											name="mapZoom" maxlength="2" />
									</td>
								</tr>
							</table>
						</form>
					</div>
	<!-- 修改用户个人密码的form -->
	<div id="pwdDlg">
		<form id="consoleForm">							 
			<table class="formTable">
				<tr>
					<th>
						<span style="color: red">*</span>原用户密码：
					</th>
					<td>
						<input type="password" class="textField" id="oriPwd"
											name="oriPwd" maxlength="25" />
					</td>
				</tr>
				<tr>	
					<th>
						<span style="color: red">*</span>新密码：
					</th>
					<td>
						<input type="password" class="textField" id="newPwd1"
											name="newPwd1" maxlength="25" />
					</td>
				</tr>
				<tr>	
					<th>
						<span style="color: red">*</span>确认新密码：
					</th>
					<td>
						<input type="password" class="textField" id="newPwd2"
											name="newPwd2" maxlength="25" />
					</td>
				</tr>
			</table>
		</form>
	</div>